<?php

namespace App\Models\Personnel;

use App\Models\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

class PersonnelInjured extends Model
{
    protected $table = 'akbus_personnel_injured';

    protected $fillable = [
        'injured_at',
        'injured_reason',
    ];

    /**
     * 类型转化
     *
     * @var array
     */
    protected $casts = [
    ];

    public function getIsJoinTuAttribute($value): string
    {
        return (string) $value;
    }

    public function getIsInjuredAttribute($value): string
    {
        return (string) $value;
    }

    public function personnel(): BelongsTo
    {
        return $this->belongsTo(Personnel::class);
    }
}
